Skip to main content Skip to complementary content

Managing user and group roles using the Compose CLI

Information noteThis feature is available from Compose May 2022 SR 01

You can set and update user and group roles using the Compose CLI. You can also remove users and groups from a role in one of the available scopes (for example, Admin in All Projects). This is especially useful if you need to automate project deployment. Before you can use the CLI, you must first run the Connect command as described in Connecting to Qlik Compose server.

Adding or updating roles

You can add a new user or group and assign a role to that user/group, or you can update the role of an existing user or group. If the specified user or group does not exist, they will be added to Compose.

Syntax

composecli set_user_or_group_role --scope global|allprojects|project [--project_name project-name] --role admin|designer|operator|viewer|none --user_name netbios\user|--group_name netbios\group

Parameters

Parameter Description
scope The scope of the user or group: global, allprojects, or project.
role Required. The role that you want to assign the user or group: none, viewer, operator, designer, or admin.
project_name The name of the project to assign the role on. Only required if --scope project.
user_name

The name of the user to add or update. Required if no group is specified.

Users must be specified in the following format:

NetBIOS-name\user

Example:

qa\mike

group_name

The name of the group to add or update. Required if no user is specified.

Users must be specified in the following format:

NetBIOS-name\group

Example:

qa\admins

Example

composecli set_user_or_group_role --scope project --project_name myproject --role admin --group_name qa\admins

Revoking roles

You can revoke a user or group's role from a particular project, from all projects, or from Compose.

Syntax

composecli remove_user_or_group_role --scope global|allprojects|project [--project_name project-name] --user_name netbios\user|--group_name netbios\group

Parameters

Parameter Description
scope The scope of the user or group to remove: global, allprojects, or project.
project_name The name of the project to remove the user or group from. Only required if --scope project.
user _name

The name of the user to remove. Required if no group is specified.

Users must be specified in the following format:

NetBIOS-name\user

Example:

qa\mike

group_name

The name of the group to remove. Required if no user is specified.

Users must be specified in the following format:

NetBIOS-name\group

Example:

qa\admins

Example

composecli remove_user_or_group_role --scope project --project_name myproject --user_name qa\mike

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!